Reactive Method Dispatch for Context-Oriented Programming
نویسنده
چکیده
We are on the verge of a post-PC revolution where computing power is shifting from laptops and desktops to smartphones, tablets and everyday objects such as eyeglasses and coffee machines. Those computing objects come equipped with a myriad of context sensors such as an accelerometer, a proximity sensor, a gyroscope, a GPS receiver and NFC technology. Context sensors enable the development of context-aware applications that continuously adapt their behaviour to match the context of use. In this dissertation, we refer to applications that are always prepared to promptly adapt their behaviour in reaction to context changes as reactive context-aware applications. Our research hypothesis is that developing reactive context-aware applications remains notoriously difficult because of the lack of suitable programming language abstractions coupled with the unpredictable nature of context changes. More concretely, current programming languages fall short of providing the appropriate support for developing context-aware applications that need to react promptly to a sudden context change – especially if such a context change occurs in the middle of an ongoing procedure execution. Such a context change may require an ongoing procedure execution to be promptly interrupted in order to prevent its execution from happening in a wrong context. The vision of this dissertation is to investigate novel programming language abstractions to facilitate the development of reactive context-aware applications. We propose a new programming language model called interruptible context-dependent executions, where a procedure execution is always constrained to happen only under a developer specified context condition. In this model, the execution of a context-dependent procedure can be seamlessly interrupted or resumed depending on whether the specified context condition is satisfied or not. The language runtime ensures that the execution state of a context-dependent procedure is automatically preserved between interruptions. The model features a new dispatching mechanism called reactive dispatching that continually takes into account new context changes to select the applicable procedures and to suspend or interrupt ongoing procedure executions. We present a proof-of-concept programming language called Flute that incorporates the interruptible context-dependent executions model. Flute has been implemented as a meta-interpreter on top of iScheme – a technological research artefact that we developed to enable the experimentation with novel language abstractions and features to ease the development of reactive context-aware applications. iScheme runs on the iOS mobile platform and as such it fosters experiments on real mobile devices.
منابع مشابه
Context-Oriented Programming with the Ambient Object System
In this paper we present AmOS, the Ambient Object System that underlies the Ambience programming language. AmOS implements a computation model that supports highly dynamic behaviour adaptation to changing contexts. Apart from being purely object-based, AmOS features first-class closures, multimethods and contexts. Dynamic method scoping through a subjective dispatch mechanism is at the heart of...
متن کاملModularly Typesafe Interface Dispatch in JPred
Multiple dispatch generalizes the receiver-oriented dynamic dispatch of traditional object-oriented (OO) languages by allowing the run-time classes of all arguments to be employed. While research over the last decade has shown how to integrate multiple dispatch with the modular static typechecking found in traditional OO languages, that work has been forced to impose unnatural restrictions or m...
متن کاملFast Algorithms for Compressed Multi-Method Dispatch Tables Generation
The eeciency of dynamic dispatch is a major impediment to the adoption of multi-methods in object-oriented languages. In this paper, we propose a simple multi-method dispatch scheme based on compressed dispatch tables. This scheme is applicable to any object-oriented language using a method precedence order that satisses a speciic monotonous property (e.g., as Cecil and Dylan), and guarantees t...
متن کاملSolution of Multi-Objective optimal reactive power dispatch using pareto optimality particle swarm optimization method
For multi-objective optimal reactive power dispatch (MORPD), a new approach is proposed where simultaneous minimization of the active power transmission loss, the bus voltage deviation and the voltage stability index of a power system are achieved. Optimal settings of continuous and discrete control variables (e.g. generator voltages, tap positions of tap changing transformers and the number of...
متن کاملObject - Oriented Economic Power Dispatch of Electrical Power System with minimum pollution using a Genetic Algorithm JES
This paper presents solution of optimal power flow (OPF) problem of electrical power system via a genetic algorithm of real type. The objective is to minimize the total fuel cost of generation and environmental pollution caused by fossil based thermal generating units and also maintain an acceptable system performance in terms of limits on generator real and reactive power outputs, bus voltages...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012